<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$is_language?'充值記錄詳情':'Details of the entry'}</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/weui.min.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/jquery-weui.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/demos.css">
    <script src="__MODULE_LIBS__/js/jquery-2.1.4.js"></script>
    <script src="__MODULE_LIBS__/js/fastclick.js"></script>
    <script src="__MODULE_LIBS__/js/jquery-weui.js"></script>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        html {
            width: 100%;
            height: 100%;
            font-size: 20px;
            font-family: "Microsoft YaHei", "宋体", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo;
            background: #F3F3F3;
        }

        body {
            margin: 0 auto;
            max-width: 750px;
            height: 100%;
            background: #F7F7F7;
        }

        /*顶部导航栏处的样式*/
        .navbar {
            position: relative;
            width: 100%;
            height: 2rem;
            font-size: 16px;
            color: #fff;
            line-height: 2rem;
            background: #373553;
        }

        .navbar-item {
            position: absolute;
            left: 0;
            top: 0;
            display: block;
            width: 3.2rem;
            height: 2rem;
            font-size: 14px;
            color: #fff;
            text-align: center;
        }

        .navbar-item > img {
            width: 0.8rem;
            height: 0.7rem;
            vertical-align: middle;
        }

        .navbar-center {
            text-align: center;
        }

        /*主体部分的样式*/
        .content {
            width: 100%;
        }

        .weui-form-preview:after, .weui-form-preview:before, .weui-form-preview__hd:after {
            border: 0;
        }

        .weui-form-preview__hd:after {
            left: 0;
        }

        .weui-form-preview__hd, .weui-form-preview__bd {
            border-bottom: 1px #E0E0E0 solid;
        }

        .font {
            font-size: 0.7rem;
        }

        .weui-form-preview__value {
            color: #000;
        }

        .red {
            color: #F44444;
        }
    </style>
</head>
<body>
<header class="navbar">
    <a href="{:url('rechargelist')}" class="navbar-item">
        <img src="__MODULE_LIBS__/img/back.png"/>&nbsp;{$is_language?'返回':'Return'}
    </a>
    <div class="navbar-center">{$is_language?'充值記錄詳情':'Details of the entry'}</div>
    <div class="navbar-item1">
        <select name="" id="yy">
            <option value="1" {$is_language?'selected':''}>中文</option>
            <option value="0" {$is_language?'':'selected'}>English</option>
        </select>
    </div>
</header>
<div class="content">

    <div class="weui-form-preview">
        <div class="weui-form-preview__hd">
            <label class="weui-form-preview__label font">{$is_language?'充值美金':'Into the dollar'}</label>
            <em class="weui-form-preview__value red">$<?php echo number_format($data->mix_money,2,'.',',');?></em>
        </div>
        <div class="weui-form-preview__bd">
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'充值類型':'Type of transfer'}</label>
                {if $data->withdrawal_type==0}
                <span class="weui-form-preview__value">{$is_language?'支付寶':'Alipay'}</span>
                {/if}
                {if $data->withdrawal_type==1}
                <span class="weui-form-preview__value">{$is_language?'銀行卡':'Bank card'}</span>
                {/if}
                {if $data->withdrawal_type==2}
                <span class="weui-form-preview__value">{$is_language?'微信':'WeChat'}</span>
                {/if}
                {if $data->withdrawal_type==3}
                <span class="weui-form-preview__value">{$is_language?'平台':'platform'}</span>
                {/if}
            </div>
            {if $data->status!=2}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'充值賬號':'Add in account'}</label>
                <span class="weui-form-preview__value">{$data->account}</span>
            </div>

            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'充值姓名':'Insert name'}</label>
                <span class="weui-form-preview__value">{$data->account_name}</span>
            </div>
            {/if}
        </div>
        <div class="weui-form-preview__bd">
            {if $data->status!=2}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'開戶銀行':'Bank of deposit'}</label>
                <span class="weui-form-preview__value">{$data->bank}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'開戶地址':'Opening address'}</label>
                <span class="weui-form-preview__value">{$data->acc_bank}</span>
            </div>
            {/if}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'美金匯率':'Dollar exchange rate'}</label>
                <span class="weui-form-preview__value">1:{$data->exchange}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'充值人民幣':'Exchange RMB'}</label>
                <span class="weui-form-preview__value">￥<?php echo number_format($data->money,2,'.',',');?></span>
            </div>
            {if $balance->is_balance==1}
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">{$is_language?'您為':'you are'}{$balance->balance_level}，{$is_language?'實際打款':'Actual money'}<span style="color:#F44444">￥<?php echo number_format($data->money*$balance->balance_rate,2,'.',',');?></span></label>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">
                        （{$is_language?'充值折扣為':'The discount is'}{$balance->balance_rate}）
                    </label>
                </div>
            {/if}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">{$is_language?'狀態':'State'}</label>
                {if $data->status==0}
                <span class="weui-form-preview__value">{$is_language?'匹配中':'Matching'}</span>
                {/if}
                {if $data->status==1}
                <span class="weui-form-preview__value">{$is_language?'等待打款':'Waiting to be exchanged'}</span>
                {/if}
                {if $data->status==2}
                <span class="weui-form-preview__value">{$is_language?'充值完成':'Cash in'}</span>
                {/if}
                {if $data->status==3}
                <span class="weui-form-preview__value">{$is_language?'匹配失敗':'Matching failure'}</span>
                {/if}
            </div>
            {if $data->status==1}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label" style="color: #F44444;">{$is_language?'打款請嚴格按照上述金額':'Please pay in strict accordance with the above amount'}（{$is_language?'小數點後兩位':'Two decimal places'}），{$is_language?'並在附屬欄填寫您的會員賬號':'And fill in your member account in the subsidiary column'}。</label>
            </div>
            {/if} 
        </div>
    </div>
</div>


<script type="text/javascript">
    $(document).on("change",'select#yy',function(){
        var yy = $(this).val();
        console.log(yy)
        var url = "{:url('index/language')}";
        $.post(url,{language:yy},function (res) {
            window.location.reload();
        })
    });
    $(function () {
        FastClick.attach(document.body);
    })
</script>
</body>
</html>
